CREATE NONCLUSTERED INDEX [_dta_index_Sales_Star_Customer_11_659689598__K4_K2_K47_K1] ON RD_Common.[dbo].[Sales_Star_Customer] 
(
	[ParentNumber] ASC,
	[SourceID] ASC,
	[ShiptoNumber] ASC,
	[CustomerNumberID] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [_dta_index_Star_Dates_11_1093578934__K1_K57] ON RD_Common.[dbo].[Star_Dates] 
(
	[Dates] ASC,
	[CompanyDateID] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [_dta_index_Star_UOMConversionFactors_11_1413580074__K5_K4_K6_2_3_8] ON RD_Common.[dbo].[Star_UOMConversionFactors] 
(
	[UnitOfMeasure] ASC,
	[ItemNumber] ASC,
	[RelatedUnitOfMeasure] ASC
)
INCLUDE ( [SourceID],
[BusinessUnitCode],
[ConversionFactor]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [_dta_index_JOIN_CUSTOMER_SUPPL_13_1077578877__K2_K4] ON RD_CommonWork.[dbo].[JOIN_CUSTOMER_SUPPL] 
(
	[SOURCEID] ASC,
	[CUSTOMERNUMBER] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [_dta_index_Sales_Star_Facts_7_1045578763__K25_K56_K12] ON RD_SalesMart.[dbo].[Sales_Star_Facts] 
(
	[ItemNumber] ASC,
	[UnitOfMeasureAsInput] ASC,
	[SourceID] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [_dta_index_Sales_Star_Facts_7_1045578763__K5_K56_K16_K19_K25_K35_K1_K57_K60_K15_K17_K6_K12_45_53_55] ON RD_SalesMart.[dbo].[Sales_Star_Facts] 
(
	[CustomerNumberID] ASC,
	[UnitOfMeasureAsInput] ASC,
	[OrderTypeCode] ASC,
	[TransactionType] ASC,
	[ItemNumber] ASC,
	[InvoiceDateID] ASC,
	[FactsExtID] ASC,
	[UnitOfMeasurePrimary] ASC,
	[ParentNumber] ASC,
	[OrderNumber] ASC,
	[LineNumber] ASC,
	[ItemNumberID] ASC,
	[SourceID] ASC
)
INCLUDE ( [QuantityShipped],
[ExtendedPrice],
[ExtendedCost]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [_dta_index_Sales_Star_FactsExt_7_741577680__K1_K3_K5_K7_K10_K9_K8_K6_K49_K70_K69] ON RD_SalesMart.[dbo].[Sales_Star_FactsExt] 
(
	[FactsExtID] ASC,
	[SourceID] ASC,
	[OrderNumberDocumentCompany] ASC,
	[OrderTypeCode] ASC,
	[TransactionType] ASC,
	[OrderSuffix] ASC,
	[LineNumber] ASC,
	[OrderNumber] ASC,
	[PriceOverrideCode] ASC,
	[DocumentType] ASC,
	[DocumentNumber] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [_dta_index_Sales_Star_FactsHdr_7_389576426__K1_K56] ON RD_SalesMart.[dbo].[Sales_Star_FactsHdr] 
(
	[FactsHdrID] ASC,
	[RouteCode] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [_dta_index_Sales_Star_PriceAdjustment_7_821577965__K23] ON RD_SalesMart.[dbo].[Sales_Star_PriceAdjustment] 
(
	[PriceAdjustmentKeyID] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

CREATE NONCLUSTERED INDEX [_dta_index_Sales_Star_PriceLedger_7_677577452__K5_K3_K4_K6_K1_K7_K33_f54] ON RD_SalesMart.[dbo].[Sales_Star_PriceLedger] 
(
	[OrderNumberDocumentCompany] ASC,
	[OrderNumber] ASC,
	[OrderTypeCode] ASC,
	[LineNumber] ASC,
	[SourceID] ASC,
	[SequenceNumber] ASC,
	[PriceAdjustmentKeyID] ASC
)
WHERE ( [Sales_Star_PriceLedger].[OrderTypeCode] >= 'CO'  AND  [Sales_Star_PriceLedger].[OrderTypeCode] <= 'SU'  AND  [Sales_Star_PriceLedger].[SequenceNumber] >= 902  AND  [Sales_Star_PriceLedger].[SequenceNumber] <= 998 ) 
WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [_dta_index_Sales_Star_PriceLedger_7_677577452__K5_K3_K4_K6_K1_K7_K33_K37_K38_K39_K40_K41_K71_25] ON RD_SalesMart.[dbo].[Sales_Star_PriceLedger] 
(
	[OrderNumberDocumentCompany] ASC,
	[OrderNumber] ASC,
	[OrderTypeCode] ASC,
	[LineNumber] ASC,
	[SourceID] ASC,
	[SequenceNumber] ASC,
	[PriceAdjustmentKeyID] ASC,
	[OrderSuffix] ASC,
	[PriceHistoryAlternateKey] ASC,
	[PriceHistoryAlternateKeySource] ASC,
	[SubSequenceNumber] ASC,
	[Tier] ASC,
	[TargetApplication] ASC
)
INCLUDE ( [UnitPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

